import request from '@/utils/request'
export function getStudents(){
    return request({
        url:'/Studentdemo/getStudents',
        method:'get'
    })
}
export function deleteStudent(id){
    return request({
        url:'/Studentdemo/deleteStudent/?id='+id,
        method:'delete'
    })
}
export function addStudent(student) {
    return request({
      url: "/Studentdemo/addStudent",
      method: "post",
      data: student,
    });
  }
  export function updateStudent(student) {
    return request({
      url: "/Studentdemo/updateStudent",
      method: "post",
      data: student,
    });
  }
  export function deleteStudents(ids) {
    return request({
      url: "/Studentdemo/deleteStudents",
      method: "delete",
      headers: {
        'Content-Type': 'application/json'
      },
      data: ids, 
    });
  }
  export function selectStudents(data) {
    return request({
      method: 'post',
      url: '/Studentdemo/selectStudents',
      headers: {
        'Content-Type': 'application/json'
      },
      data
    })
  }